[Mini-OS] Fix domain blocking race
authorKeir Fraser <keir.fraser@citrix.com>
Sat, 24 Nov 2007 13:31:39 +0000 (13:31 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sat, 24 Nov 2007 13:31:39 +0000 (13:31 +0000)
commit32946b60f1bdfe74552e27651999ae498e6882d4
tree47033533bf72920071979821f82eb6d3ff0a21b3
parent153bf118147546554a2cb774a637f94b89c36f56
[Mini-OS] Fix domain blocking race

A callback which wakes a thread may happen between the moment
schedule() gives hand to the idle thread and the latter blocks the
domain.  Idle hence needs to atomically check that no thread is
running and block, else awoken threads may have to wait up to 10
seconds.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
extras/mini-os/sched.c